package com.haidao.admin.component.service.impl;


import com.haidao.admin.component.dao.ReportRecordDao;
import com.haidao.admin.component.entity.ReportRecord;
import com.haidao.admin.component.entity.Task;
import com.haidao.admin.component.service.ReportRecordService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.ExampleMatcher;
import org.springframework.stereotype.Service;

@Service("report_record")
@Slf4j
public class ReportRecordServiceImpl implements ReportRecordService {
    @Value("${report.baseUrl}")
    private String baseUrl;

    @Value("${report.cmcId}")
    private String cmcId;

    @Resource
    private ReportRecordDao reportRecordDao;

    @Override
    public long count(ReportRecord record) {
        ExampleMatcher matcher = ExampleMatcher.matching().withIgnoreNullValues();
        Example<ReportRecord> ex = Example.of(record, matcher);
        return  reportRecordDao.count(ex);
    }
}
